<?php

abstract class HTML_Fluent_XHTML_Element_Base_HTML extends HTML_Fluent_Element {

    /**
     * The name of this element
     *
     * @return string
     */
    public function getName() {
        return 'html';
    }

    protected $attributes = array(
        'dir' => null,
        'id' => null,
        'lang' => null,
    );

    /**
     * Add a new element 'body' as a child
     *
     * @return HTML_Fluent_XHTML_Element_BODY
     */
    public function body() {
        return $this->newChildElement('body', func_get_args());
    }

    /**
     * Add a new element 'head' as a child
     *
     * @return HTML_Fluent_XHTML_Element_HEAD
     */
    public function head() {
        return $this->newChildElement('head', func_get_args());
    }


    /**
     * Set the value of the 'dir' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_HTML
     */
    public function dir($value) {
        return $this->setAttribute('dir', $value);
    }

    /**
     * Set the value of the 'id' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_HTML
     */
    public function id($value) {
        return $this->setAttribute('id', $value);
    }

    /**
     * Set the value of the 'lang' attribute.
     *
     * @param string|null $value
     * @return HTML_Fluent_XHTML_Element_HTML
     */
    public function lang($value) {
        return $this->setAttribute('lang', $value);
    }

}
